#ifndef __DISPLAY_BUFFER_H__
#define __DISPLAY_BUFFER_H__
#include "display_dev.h"

class display_buffer:protected display_dev
{
    public:
        
    public:  
        display_buffer();
        ~display_buffer();


    protected:

        int add_fb_sp_bo(display_dev::sp_bo *bo, uint32_t format);
        display_dev:: sp_bo* create_sp_bo(uint32_t width, uint32_t height,
                                uint32_t depth, uint32_t bpp, uint32_t format, uint32_t flags);

        display_dev:: sp_bo* create_sp_bo(uint32_t width, uint32_t height,
                                uint32_t depth, uint32_t bpp, uint32_t format, int fd,uint32_t flags);

        void fill_bo(display_dev:: sp_bo *bo, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
        void draw_rect(display_dev:: sp_bo *bo, uint32_t x, uint32_t y, uint32_t width,
                    uint32_t height, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
        void free_sp_bo(display_dev::sp_bo *bo,bool isDestroyDumb);
        int map_sp_bo(display_dev::  sp_bo* bo);

    private:
        friend class screens;
};

#endif